﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

#if UNITY_EDITOR
    using UnityEditor;
#endif

public class PolygonCollider : MyCollider
{
    public List<Vector3> mBounds;

    public override void Draw(Color color)
    {
        Handles.color = color;
        for (int i = 0; i < mBounds.Count; i++)
            Handles.DrawLine(mBounds[i], mBounds[(i + 1) % mBounds.Count]);
    }

#if UNITY_EDITOR
    private void Reset()
    {
        mBounds = new List<Vector3>();
        mBounds.Add(new Vector3(-1, 0, -1));
        mBounds.Add(new Vector3(-1, 0, 1));
        mBounds.Add(new Vector3(1, 0, 1));
        mBounds.Add(new Vector3(1, 0, -1));
    }
#endif
}
